﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true" CodeBehind="TroubleList.aspx.cs" Inherits="ExpertMIS.Admin.TroubleList" %>
<%@ Register Src="UserControl/AuditPagingGridView.ascx" TagName="AuditPagingGridView"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script src="../js/jquery-1.3.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('#<%=lbQuery.ClientID %>').click(function() {
                // 判断用户姓名查询条件是否非空
                var questionKey = $("#<%=txQContent.ClientID %>").val();
                var isPassed = $("#<%=ddlIsPassed.ClientID %>").val();
                var lastTime = $("#<%=txLastTime.ClientID %>").val();

                var search = "search={1=1 ";
                // HACK，此处应该为全文搜索
                if (questionKey && questionKey != "") {
                    search = search + " AND F_QContent like '%" + questionKey + "%'";
                }

                if (isPassed != 'all') {
                    if (isPassed == 'true') {
                        search = search + ' AND F_IsPassed = 1'
                    } else {
                        search = search + ' AND F_IsPassed = 0'
                    }
                }

                if (lastTime && lastTime != "") {
                    search = search + " AND F_Stamp <= '" + lastTime + "'";
                }



                search = search + "}";
                
                var href = window.location.href;
                var index = href.indexOf("?");
                if (index > 0) {
                    href = href.substring(0, index);
                }

                window.location.href = href + "?" + search;
                return false;
            });
        });
    </script> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <div style="width: 100%;">
                    <table cellpadding="0" cellspacing="0" style="text-align:left;width:100%; height: 100%;">
                        <tr>
                            <td>
                                &nbsp;请选择状态</td>
                            <td class="style1">
                                <asp:DropDownList ID="ddlIsPassed" runat="server"   Width="172px">
                                    <asp:ListItem Selected="True" Value="all">所有困难</asp:ListItem>
                                    <asp:ListItem Value="true">已解决困难</asp:ListItem>
                                    <asp:ListItem Value="false">未解决困难</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                             <td>
                                 提交截止日期</td>
                            <td>
                                
                                <asp:TextBox ID="txLastTime" runat="server" Width="169px"></asp:TextBox>
                                【格式为：2009-8-31 00：00：00】</td>
                                <td></td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;关键字内容</td>
                            <td class="style1" colspan="3">
                                <asp:TextBox ID="txQContent" runat="server" Width="455px"></asp:TextBox>
                            </td>
                             <td style="text-align:left">
                        &nbsp; |&nbsp;<asp:Button ID="lbQuery" runat="server" Text="查询"></asp:Button>
                </td>
                        </tr>
                    </table>
       
    </div>
    <div style="height: 10px; width: 100%;">
        <uc1:AuditPagingGridView ID="pgvTroubles" runat="server" />
    </div>
</asp:Content>

